<?php

class Controller_Edit extends FLEA_Controller_Action
{
   function actionindex(){
   }
   function actionshowbysize(){
        $table_words = & FLEA::getSingleton('Table_tofowordpic');
        $smarty =& $this->_getView();
        $words = $table_words->find((int)$_GET['id']);
        $image = imagecreatefromstring($words[PicBuf]);
        FLEA::loadFile('APP_Helper_MyImage');
        $out = new resizeimage($image,150,100,0);
        $image = $out->resize();
        Header("Content-type:image/png"); 
        imagepng($image);
    }
    function actionaudio(){
        $table_voice = & FLEA::getSingleton('Table_tofowordvoice');
        $voice = $table_voice->find((int)$_GET['id']);
        Header("Content-type:audio/wav"); 
        print $voice[VoiceData];
    }
}
